package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Advertisement_picture;
import cn.bj.dao.Advertisement_pictureMapper;

@Service
public class AdvertisementService {
	@Autowired
	Advertisement_pictureMapper advertisement_pictureMapper;

	// 查询
	public List<Advertisement_picture> selectAllAdvers() {
		return advertisement_pictureMapper.selectByExample(null);
	}

	// 插入
	public int insertAdver(Advertisement_picture adver) {
		return advertisement_pictureMapper.insert(adver);
	}

	// 删除
	public int deleteAdver(Integer id) {
		return advertisement_pictureMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Advertisement_picture selectById(Integer id) {
		return advertisement_pictureMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateAdverP(Advertisement_picture adverp) {
		return advertisement_pictureMapper.updateByPrimaryKey(adverp);
	}

}
